home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 001-025 / scopedisk11 / rex / readme < prev    next >
Internet Message Format  |  1995-03-18  |  4KB

  1. From: kim@amdahl.uts.amdahl.com (Kim DeVaughn)
  2. Subject: IPC ... an ARexx example
  3. Date: 7 Mar 88 12:32:57 GMT
  4. Organization: Amdahl Corporation,  Sunnyvale, CA 94086
  5. Keywords: The wheel exists.  It does not need reeinvention.  It may need improvement.
  6.  
  7.  
  8. [ For all you do ... this line's for you ... ]
  9.  
  10. With all the current discussion about IPC methodology, ARexx, and such, this
  11. seems like a good time to post the attached example of a simple form of an
  12. ARexx interface.  It is being posted here, rather than in comp.sources.amiga,
  13. as it is short, and is primarily example code.
  14.  
  15. In the attached shar file, you'll find a small standalone program called
  16. "rex" that I used to familiarize myself with the (COMMAND form of the)
  17. ARexx interface.  You'll also find the actual interface file (rexx.c) that
  18. I used to interface Matt's "dme" editor to ARexx.
  19.  
  20. Besides the rexx.c file, I only had to add about 20 lines of code to the
  21. dme sources (which Matt has improved upon, I believe).  This interface
  22. added less than 2K to the dme executable.  The changes to "dme" were to
  23. add the 3 "explicitly called" functions [rx(), rx1(), rx2()] to the command
  24. table, and to have dme call the do_rexx() function with the rest of the
  25. command-line as the argument, in the event of a "command not found"
  26. condition (for implicit invocation).
  27.  
  28. Not included are the header files that come in the ARexx package ... I don't
  29. have Bill Hawes' permission to redistribute them (yet), nor the C bindings,
  30. but if you have ARexx, you have a copy of them anyway.  Of course you need
  31. ARexx to run the "rex" example (try "rex args" to see what "rex" passes to
  32. ARexx, and watch what ARexx does when it tries to execute the "foo" command).
  33.  
  34. Now this is a very simple and basic form of interface to ARexx.  More
  35. sophisticated facilities are available.  I just wanted to see what a minimal
  36. interface would look like, with a minimum of changes to dme.
  37.  
  38. The dme interface works quite well, given that dme was never designed with
  39. such an interface in mind.  There are some limitations because of the way
  40. dme does error and command completion reporting, but the point is that I
  41. was able to interface the two with very little effort.  To fully take
  42. advantage of ARexx's capabilities will require some additional work in dme's
  43. innards, and perhaps the addition of some new dme commands.
  44.  
  45. When Rob Peck posts his speechtoy with an ARexx interface, I think I'll see
  46. about making a "talking editor" out of dme using speechtoy (which could just
  47. as well be a spelling checker, etc.)  Should be a piece of cake ...
  48.  
  49.  
  50. Now I'm not saying that the ARexx interface is perfect for all IPC applications,
  51. but it *is* quite powerful, and can be used pretty simply.  Bill has done a
  52. very professional job of implementing the REXX interpreter, and providing an
  53. interface that is consistant with the Amiga OS.  The supplied .libraries have
  54. many more additional functions than are used in the example files.  These
  55. functions are not specific to ARexx per se, and can be used by any program
  56. that wants to take advantage of them (similar to the way one can take advantage
  57. of the ARP functions in the arp.library).
  58.  
  59. Other advantages of ARexx are that it is small (rexxsyslib.library is less than
  60. 32K, and the resident program "rexxmast" is less than 2K), and fast, having
  61. been implemented in very tight assembly language.  It is well documented, the
  62. manual being 140+ pages.  It uses an established language for it's processing
  63. (REXX is one of the few really good things to make it out of Big Blue ... must
  64. be because it was a research project :-) ).
  65.  
  66. And it is available NOW ... TODAY ... for less than fifty bucks!
  67.  
  68.  
  69. Sorry if I started sounding commercial, but it really *is* a good product.
  70. I hope the development community uses it as a base for a *standardized* IPC
  71. facility.  If there are fundemental deficiencies in ARexx, Bill is a pretty
  72. reasonable guy, and I'm sure he'd be interested in improving the product.
  73.  
  74. Enough verbage!  Here's the code ...
  75.  
  76. /kim
  77.  
  78.  
  79. --
  80. UUCP:  kim@amdahl.amdahl.com
  81.   or:  {sun,decwrl,hplabs,pyramid,ihnp4,uunet,oliveb,cbosgd,ames}!amdahl!kim
  82. DDD:   408-746-8462
  83. USPS:  Amdahl Corp.  M/S 249,  1250 E. Arques Av,  Sunnyvale, CA 94086
  84. CIS:   76535,25
  85.  
  86.